//
//  VideoCaptureProgressView.h
//  OnionHome
//
//  Created by fengjie on 2019/10/8.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSUInteger, CEVehicleVideoCaptureStatus) {
    CEVehicleVideoCaptureStatusReady,//准备好了
    CEVehicleVideoCaptureStatusCapturing,//捕捉
    CEVehicleVideoCaptureStatusCaptured,//捕获
    CEVehicleVideoCaptureStatusUndo,//撤销
    CEVehicleVideoCaptureStatusFinished,//完成了
    CEVehicleVideoCaptureStatusDelete,//删除
};



@interface VideoCaptureProgressView : UIView

@property (assign, nonatomic) CEVehicleVideoCaptureStatus status;

@property (assign, nonatomic) CGFloat totalProgress;
@property (assign, nonatomic) CGFloat currentProgress;

@property (strong, nonatomic) UIView *progressBar;
@property (strong, nonatomic) UIView *flashDotView;
@property (strong, nonatomic) UIView *selectedProgressView;

/**
 每一个元素代表一个进度段
 */
@property (strong, nonatomic) NSArray <NSNumber *> *progressValueList;

@property (assign, nonatomic) CGSize contentSize;

- (void)addProgressItem:(CGFloat)progress;
- (void)removeProgressItem:(NSInteger)index;
- (void)removeLastProgressItem;

- (void)selectedProgress:(NSUInteger)index;
- (void)unSelectedProgress;
- (void)updateProgress:(CGFloat)currentProgress;

- (void)flashDotView:(BOOL)flash;

- (void)startFlashDotViewAnimation;
- (void)stopFlashDotViewAnimation;

+ (CGFloat)viewHeight;

@end

NS_ASSUME_NONNULL_END
